//go:build wireinject

package wire

import (
	"ginmt/initialize"
	"ginmt/pkg"
	"github.com/google/wire"
	"gorm.io/gorm"
)

func InitApp() (*initialize.App, error) {
	wire.Build(initialize.NewApp, initialize.NewServer, initialize.NewEngine, pkg.NewAppCtx, initialize.InitDb, initialize.InitConfig, initialize.InitWechat)
	return &initialize.App{}, nil
}

func GormDb() (*gorm.DB, error) {
	wire.Build(initialize.InitDb, initialize.InitConfig)
	return &gorm.DB{}, nil
}
